/**
 * Created by GYL on 2018/7/25
 */
import React, { Component } from 'react';
import { Row, Col, Tabs, Card, InputNumber } from 'antd';
import Container from '../../components/common/Container';
import MyTable from '../../components/common/MyTable';
import PublicService from '../../services/PublicService';
import moment from 'moment';
import request from '../../utils/request';
class PubDetails extends Component {
    constructor(props) {
        super(props)


    }
    state = {
        loading: false,
        selectedRowKeys: [],
        selectedRows: [],
        dataSource: [],
        pageIndex: 1,
        pageSize: 10,
        complaintWay:null,
        linkman:null,
        linkWay:null,
        address:null,
        description:null




    }
    componentDidMount() {
        let id = PublicService.getCookie("Publicid")
        request({
            url: `/zhrq-web/socialsentiment/complaint/getComplaint?id=${id}`,
            method: 'GET',
          
        }).then(data=> {
            console.log(data)
            this.setState({
                complaintWay:data.complaintWay,
                linkman:data.linkman,
                linkWay:data.linkWay,
                address:data.address,
                description:data.description,
                createTime:data.createTime,
                gasStationName:data.gasStationName,
                gasStationName2:data.gasStationName2,
                replyContent:data.replyContent,
            })
        })

    }
    onA = () => {
        this.props.history.goBack()
    }
    render() {
        const { loading, selectedRowKeys, dataSource, pageIndex, pageSize } = this.state
        const windowWidth = document.body.clientWidth;
        const columns = this.columns
        const height = document.body.clientHeight;
        let containerHeight = '88vh';
        if (windowWidth > 1367) {
            containerHeight = '88vh';
        }

        return (
            <div>
                <Container
                    style={{ height: containerHeight, position: "relative", marginTop: "1vh", padding: "0px 10px" }}
                    header={true}
                >
                 
                    <Row>
                        <Col span={12}><a  onClick={this.onA}>社会舆情管理</a> >> 详情页</Col>
                        <Col span={12}><a  onClick={this.onA} style={{ float: "right" }}>返回</a></Col>
                    </Row>
                    <p style={{borderBottom:"1px solid #D6E3FF",lineHeight:"20.5px"}}><span style={{borderRadius:"4px 4px 0px 0px",position:"relative"}}><span style={{position:"absolute",width:5,height:16,backgroundColor:"#1890ff",left:"-10px",top:"2px"}}></span>基本信息</span></p>
                    {/* <p style={{borderBottom:"1px solid #D6E3FF",lineHeight:"20.5px"}}><span style={{backgroundColor:"#3C8FFF",color:"#fff",borderRadius:"4px 4px 0px 0px"}}>基本信息</span></p> */}
                    <Row>
                        <Col span={6}>投诉时间 : {moment(this.state.createTime).format("YYYY-MM-DD HH:mm:ss")}</Col>
                        <Col span={6}>投诉类型 : {this.state.complaintWay == 1?"实名投诉":"匿名投诉"}</Col>
                        <Col span={6}>投诉人 : {this.state.linkman}</Col>
                        <Col span={6}>联系方式 : {this.state.linkWay}</Col>
                    </Row>

                    <Row>
                        <Col span={6}>投诉对象 : {this.state.gasStationName}{this.state.gasStationName2}</Col>
                        <Col span={6}>投诉对象地址 : {this.state.address}</Col>
                        <Col span={6}>详细描述 : {this.state.description}</Col>
                    </Row>
                    <p style={{borderBottom:"1px solid #D6E3FF",lineHeight:"20.5px"}}><span style={{borderRadius:"4px 4px 0px 0px",position:"relative"}}><span style={{position:"absolute",width:5,height:16,backgroundColor:"#1890ff",left:"-10px",top:"2px"}}></span>详情照片</span></p>
                      {/* <p style={{borderBottom:"1px solid #D6E3FF",lineHeight:"20.5px"}}><span style={{backgroundColor:"#3C8FFF",color:"#fff",borderRadius:"4px 4px 0px 0px"}}>详情照片</span></p> */}
                      <Row>
                        <Col span={6} style={{textAlign:"center"}}><div style={{width:130,margin:"0px auto",height:130,backgroundColor:"#D7D7D7"}}><img src={require("../../assets/jb1.jpg")} style={{width:"100%",height:"100%"}}/></div></Col>
                        <Col span={6} style={{textAlign:"center"}}><div style={{width:130,margin:"0px auto",height:130,backgroundColor:"#D7D7D7"}}><img src={require("../../assets/jb2.jpg")} style={{width:"100%",height:"100%"}}/></div></Col>
                        <Col span={6} style={{textAlign:"center"}}><div style={{width:130,margin:"0px auto",height:130,backgroundColor:"#D7D7D7"}}><img src={require("../../assets/jb3.jpg")} style={{width:"100%",height:"100%"}}/></div></Col>
                        <Col span={6} style={{textAlign:"center"}}><div style={{width:130,margin:"0px auto",height:130,backgroundColor:"#D7D7D7"}}><img src={require("../../assets/jb4.jpg")} style={{width:"100%",height:"100%"}}/></div></Col>
                    </Row>
                    <Col span={24}><br/><br/><br/></Col>
                    
                      <Row>
                        <Col span={2}>投诉回复 : </Col>
                        <Col span={18}>{this.state.replyContent?this.state.replyContent:"暂无回复,请回复后查看!"}</Col>
                    </Row>
                </Container>
            </div>
        )
    }
}
export default (PubDetails);
